Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@opentelemetry/metrics
Advanced tools
OpenTelemetry metrics allow a user to collect data and export it to a metrics backend like Prometheus.
npm install --save @opentelemetry/metrics
Choose this kind of metric when the value is a quantity, the sum is of primary interest, and the event count and value distribution are not of primary interest. Counters are defined as Monotonic = true
by default, meaning that positive values are expected.
const { MeterRegistry } = require('@opentelemetry/metrics');
// Initialize the Meter to capture measurements in various ways.
const meter = new MeterRegistry().getMeter('your-meter-name');
const counter = meter.createCounter('metric_name', {
labelKeys: ["pid"],
description: "Example of a counter"
});
const labels = meter.labels({ pid: process.pid });
// Create a BoundInstrument associated with specified label values.
const boundCounter = counter.bind(labels);
boundCounter.add(10);
Gauge metrics express a pre-calculated value. Generally, this kind of metric should be used when the metric cannot be expressed as a sum or because the measurement interval is arbitrary. Use this kind of metric when the measurement is not a quantity, and the sum and event count are not of interest. Gauges are defined as Monotonic = false
by default, meaning that new values are permitted to make positive or negative changes to the gauge. There is no restriction on the sign of the input for gauges.
const { MeterRegistry } = require('@opentelemetry/metrics');
// Initialize the Meter to capture measurements in various ways.
const meter = new MeterRegistry().getMeter('your-meter-name');
const gauge = meter.createGauge('metric_name', {
labelKeys: ["pid"],
description: "Example of a gauge"
});
const labels = meter.labels({ pid: process.pid });
// Create a BoundInstrument associated with specified label values.
const boundGauge = gauge.bind(labels);
boundGauge.set(10); // Set to 10
See examples/prometheus for a short example.
Work in progress
Apache 2.0 - See LICENSE for more information.
0.3.3
Released 2020-01-22
opentelemetry-core
, opentelemetry-exporter-collector
, opentelemetry-exporter-zipkin
, opentelemetry-node
, opentelemetry-plugin-dns
, opentelemetry-plugin-document-load
, opentelemetry-plugin-grpc
, opentelemetry-plugin-http
, opentelemetry-plugin-https
, opentelemetry-plugin-ioredis
, opentelemetry-plugin-mongodb
, opentelemetry-plugin-mysql
, opentelemetry-plugin-postgres
, opentelemetry-plugin-redis
, opentelemetry-plugin-xml-http-request
, opentelemetry-shim-opentracing
, opentelemetry-tracing
, opentelemetry-types
, opentelemetry-web
opentelemetry-node
, opentelemetry-plugin-postgres
opentelemetry-metrics
opentelemetry-propagator-jaeger
opentelemetry-exporter-stackdriver-trace
opentelemetry-plugin-ioredis
FAQs
OpenTelemetry metrics SDK
The npm package @opentelemetry/metrics receives a total of 5,664 weekly downloads. As such, @opentelemetry/metrics popularity was classified as popular.
We found that @opentelemetry/metrics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.